home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / il_c / ilConvPixel.z / ilConvPixel
Encoding:
Text File  |  2002-10-03  |  8.9 KB  |  199 lines

  1.  
  2.  
  3.  
  4. iiiillllCCCCoooonnnnvvvvPPPPiiiixxxxeeeellll((((3333))))     IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll     iiiillllCCCCoooonnnnvvvvPPPPiiiixxxxeeeellll((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      iiiillllCCCCoooonnnnvvvvPPPPiiiixxxxeeeellll - a pixel that can be converted into different color models
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      iflPixel
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <il/ilCdefs.h>
  16.  
  17. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      This class abstracts the concept of a pixel of image data with a
  19.      particular color model.  It contains the color model, data type, the
  20.      number of channels, and a list of component values.  Methods are provided
  21.      to covert this pixel to different color models.
  22.  
  23. CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY
  24.      CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrrssss
  25.  
  26.           ilConvPixel * ilConvPixelCreate(iflDataType type,
  27.                                           iflColorModel cm, double min,
  28.                                           double max, iflColormap* map,
  29.                                           void* data)
  30.           ilConvPixel * ilConvPixelFromPixel(const iflPixel *pix,
  31.                                              iflColorModel cm,
  32.                                              double min, double max,
  33.                                              iflColormap* map)
  34.           ilConvPixel * ilConvPixelFromConvPixel(const ilConvPixel *pix,
  35.                                                  iflColorModel cm,
  36.                                                  double min, double max,
  37.                                                  iflColormap* map)
  38.  
  39.      CCCCoooonnnnvvvveeeerrrrssssiiiioooonnnn mmmmeeeetttthhhhooooddddssss
  40.  
  41.           void  ilConvPixelDoConversion(ilConvPixel* c, iflDataType type,
  42.                                         iflColorModel cm, double min,
  43.                                         double max, const iflColormap* map,
  44.                                         const ilConvPixel* src)
  45.           void  ilConvPixelSetColorModel(ilConvPixel* c, iflColorModel cm)
  46.           void  ilConvPixelSetMinMax(ilConvPixel* c, double min, double max)
  47.           void  ilConvPixelSetType(ilConvPixel* c, iflDataType type)
  48.           void  ilConvPixelSetColormap(ilConvPixel* c, const iflColormap* map)
  49.  
  50.      AAAAcccccccceeeessssssss mmmmeeeetttthhhhooooddddssss
  51.  
  52.           iflColorModel  ilConvPixelGetColorModel(ilConvPixel* c)
  53.           void  ilConvPixelGetMinMax(ilConvPixel* c, double* min, double* max)
  54.           const iflColormap*  ilConvPixelGetColormap(ilConvPixel* c)
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. iiiillllCCCCoooonnnnvvvvPPPPiiiixxxxeeeellll((((3333))))     IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll     iiiillllCCCCoooonnnnvvvvPPPPiiiixxxxeeeellll((((3333))))
  71.  
  72.  
  73.  
  74. FUNCTION DESCRIPTIONS
  75.      iiiillllCCCCoooonnnnvvvvPPPPiiiixxxxeeeellll(((())))
  76.  
  77.           ilConvPixel * ilConvPixelCreate(iflDataType type,
  78.                                           iflColorModel cm, double min,
  79.                                           double max, iflColormap* map,
  80.                                           void* data)
  81.           ilConvPixel * ilConvPixelFromPixel(const iflPixel *pix,
  82.                                              iflColorModel cm,
  83.                                              double min, double max,
  84.                                              iflColormap* map)
  85.           ilConvPixel * ilConvPixelFromConvPixel(const ilConvPixel *pix,
  86.                                                  iflColorModel cm,
  87.                                                  double min, double max,
  88.                                                  iflColormap* map)
  89.  
  90.  
  91.           The first constructor creates a pixel of data type, _t_y_p_e, color
  92.           model _c_m, scaling range from _m_i_n to _m_a_x, color map _m_a_p (for
  93.           iflRGBPalette), and with the component values pointed to by _d_a_t_a.
  94.           The data values are copied into the ilConvPixel constructed.  The
  95.           second constructor copies the data from the iflPixel specified by
  96.           _p_i_x.  The third constructor converts the data from another
  97.           ilConvPixel (which may be in a different color model).
  98.  
  99.      ddddooooCCCCoooonnnnvvvveeeerrrrssssiiiioooonnnn(((())))
  100.  
  101.           void  ilConvPixelDoConversion(ilConvPixel* c, iflDataType type,
  102.                                         iflColorModel cm, double min,
  103.                                         double max, const iflColormap* map,
  104.                                         const ilConvPixel* src)
  105.  
  106.  
  107.           This method converts the data in the source pixel, _s_r_c, to the
  108.           requested attributes specified by _t_y_p_e, _c_m, _m_i_n, _m_a_x and _m_a_p.  The
  109.           result is stored in this pixel.
  110.  
  111.      ggggeeeettttCCCCoooolllloooorrrrMMMMooooddddeeeellll(((())))
  112.  
  113.           iflColorModel ilConvPixelGetColorModel(ilConvPixel* c)
  114.  
  115.  
  116.           Returns the color model of this pixel.
  117.  
  118.      ggggeeeettttCCCCoooolllloooorrrrmmmmaaaapppp(((())))
  119.  
  120.           const iflColormap*  ilConvPixelGetColormap(ilConvPixel* c)
  121.  
  122.  
  123.           Returns a pointer to the color map for this pixel (or NULL if there
  124.           isn't one).
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. iiiillllCCCCoooonnnnvvvvPPPPiiiixxxxeeeellll((((3333))))     IIIImmmmaaaaggggeeeeVVVViiiissssiiiioooonnnn LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll     iiiillllCCCCoooonnnnvvvvPPPPiiiixxxxeeeellll((((3333))))
  137.  
  138.  
  139.  
  140.      ggggeeeettttMMMMiiiinnnnMMMMaaaaxxxx(((())))
  141.  
  142.           void  ilConvPixelGetMinMax(ilConvPixel* c, double* min, double* max)
  143.  
  144.  
  145.           Returns the scaling min/max of this pixel in _m_i_n and _m_a_x.
  146.  
  147.  
  148.      Copies and converts the source pixel _p_i_x, into the color model and type
  149.      of this pixel.
  150.  
  151.      sssseeeettttCCCCoooolllloooorrrrMMMMooooddddeeeellll(((())))
  152.  
  153.           void  ilConvPixelSetColorModel(ilConvPixel* c, iflColorModel cm)
  154.  
  155.  
  156.           Converts this pixel to the color model specified by _c_m.
  157.  
  158.      sssseeeettttCCCCoooolllloooorrrrmmmmaaaapppp(((())))
  159.  
  160.           void  ilConvPixelSetColormap(ilConvPixel* c, const iflColormap* map)
  161.  
  162.  
  163.           Sets the color map for this pixel to _m_a_p, the color map is not
  164.           copied.
  165.  
  166.      sssseeeettttMMMMiiiinnnnMMMMaaaaxxxx(((())))
  167.  
  168.           void  ilConvPixelSetMinMax(ilConvPixel* c, double min, double max)
  169.  
  170.  
  171.           Converts this pixel to the scaling range specified by _m_i_n and _m_a_x.
  172.  
  173.      sssseeeettttTTTTyyyyppppeeee(((())))
  174.  
  175.           void  ilConvPixelSetType(ilConvPixel* c, iflDataType type)
  176.  
  177.  
  178.           Converts this pixel to the data type specified by _t_y_p_e.
  179.  
  180. IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  181.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm iiiiffffllllPPPPiiiixxxxeeeellll
  182.      iflPixelConvert(), iflPixelGetData(), iflPixelGetDataType(),
  183.      iflPixelGetElem(), iflPixelGetNumChans(), iflPixelMax(), iflPixelMin(),
  184.      iflPixelSet(), iflPixelSetElem()
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.